/**
 * @Date: 2022-04-07 19:29:11
 * @LastEditors: sailornpg
 * @LastEditTime: 2022-04-08 13:06:04
 * @FilePath: \weibo-api\ResModel\index.js
 * @Description: 数据返回处理
 */

class SuccessModel {
  constructor(data) {
    this.code = 200
    if (data != null) {
      this.data = data
    }
    this.message = 'ok'
  }
}
class ErrorModel {
  constructor(code, message = 'error') {
    this.code = code
    this.message = message
  }
}
module.exports = {
  SuccessModel,
  ErrorModel
}